package com.goods.shop.controller;

import com.goods.shop.BaseController;
import com.goods.shop.annotation.Log;
import com.goods.shop.entity.JDLogs;
import com.goods.shop.service.jd.JdLogsService;
import com.goods.shop.service.model.WxArticle;
import com.goods.shop.service.model.wxmessage.WxTextModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import java.io.InputStream;
import java.util.List;

@Controller
@Log
public class JDLogsController extends BaseController {
    @Autowired
    private JdLogsService jdLogsService;

    @RequestMapping("/jdlog/detail/{id}")
    public String weixin(Model model, @PathVariable("id")int id, HttpServletRequest request, HttpServletResponse response){
        logger.info("start.Log......");
        JDLogs logs=this.jdLogsService.findById(id);
        model.addAttribute("log",logs);
        logger.info("end.log={}",logs.toString());
        return "jdlog/detail";
    }
}
